<?php


namespace app\common;


class OrderStatus
{
    const ORDER_CANCEL = 0;// 已取消
    const ORDER_WAIT_PAY = 1;// 待付款
    const ORDER_WAIT_ACCEPT = 2;//待发货
    const ORDER_WAIT_GO = 3;//待收货
    const ORDER_TRAVELING = 4;//待评价
    const ORDER_ARRIVE = 5;//已完成
    const ORDER_SERVING = 6;//已退单
    const ORDER_COMPLETE = 7;//待售后
    const ORDER_OVER = 8;//已处理


    public static function getOrderStatusTxt($orderStatus)
    {
        $arr = [
            0 => '已取消',
            1 => '待付款',
            2 => '待接单',
            3 => '待出发',
            4 => '行程中',
            5 => '已到达',
            6 => '已退单',
            7 => '待售后',
            8 => '已处理',
        ];
        return $arr[$orderStatus];
    }
}